fix(build): embed MediaRemoteAdapter.framework so the built app is relocatable#577
fix(build): embed MediaRemoteAdapter.framework so the built app is relocatable#577hoishing wants to merge 1 commit into
Conversation
The MediaRemoteAdapter Swift package product was linked but had no Embed Frameworks build phase, so `xcodebuild build` left the dynamic framework in DerivedData's PackageFrameworks/ and resolved it only via a dev-time rpath. The built .app ran in place but crashed once copied elsewhere (e.g. to /Applications) with "Library not loaded: @rpath/MediaRemoteAdapter.framework". Add an Embed Frameworks copy-files phase (Embed & Sign / CodeSignOnCopy) so the framework is packaged into Contents/Frameworks and the build product is relocatable. Archive-based builds embedded it implicitly; plain `build` did not. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit 5ebe9f64dffa8394b9151f48a3cb841d5f02e2ef)
|
The PR Policy check is blocking this PR because required template information is missing. Please update the PR description with:
Screenshots or video are required for UI, UX, settings, onboarding, overlay, menu bar, or visual behavior changes. If this PR has no visual changes, check the no-visual-change box in the template. If this remains incomplete for 48 hours after opening, the PR may be closed. |
Greptile SummaryThis PR fixes a relocatability bug where
|
Description
The
MediaRemoteAdapterSwift package product is linked but the app target has no Embed Frameworks build phase. As a result,xcodebuild buildleaves the dynamic framework in DerivedData'sPackageFrameworks/and the app resolves it only via a dev-time rpath. The built.appruns in place but crashes as soon as it is copied elsewhere (e.g. to/Applications):Archive-based builds embed the framework implicitly, which is why this is not seen when distributing via Organizer — but a plain
buildproduct is not relocatable.This PR adds an Embed Frameworks copy-files phase (Embed & Sign /
CodeSignOnCopy) soMediaRemoteAdapter.frameworkis packaged intoContents/Frameworks/and the build product is self-contained and relocatable.Type of Change
Related Issue or Discussion
Closes #580
Testing
swiftlint --strict --config .swiftlint.yml Sourcesswiftformat --config .swiftformat SourcesVerified: a clean
xcodebuild -configuration Release buildnow producesFluidVoice.app/Contents/Frameworks/MediaRemoteAdapter.framework,codesign --verify --deep --strictpasses, and the app launches with no dyld errors after being copied to/Applications(previously crashed on launch there).Screenshots / Video
Notes
Project-file-only change: adds one
PBXCopyFilesBuildPhase(dstSubfolderSpec = 10) plus itsPBXBuildFile(withCodeSignOnCopy) and wires it into the app target'sbuildPhases. No source changes.🤖 Generated with Claude Code